﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MemberCost.aspx.cs" Inherits="MemberMgr.Website.Member.MemberCost" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>会员消费</title>

    <script type="text/javascript">

        var searchKeyDown = function(sender, e) {
            if (e.getKey() == 13) {
                if (!Ext.isEmpty(sender.getValue())) {
                    X.SearchKeyPress();
                }
            }
        };
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" Locale="zh-CN" />
    <ext:Viewport ID="Viewport1" runat="server" Layout="border">
        <Items>
            <ext:FormPanel ID="fpSearchPanel" runat="server" Region="North" Title="查询条件" Padding="5"
                Height="100" Frame="true" Margins="5 5 5 5" Layout="Table" Icon="Magnifier">
                <Items>
                    <ext:TableLayout ID="tblLayout" runat="server" Columns="4" LabelWidth="70" LabelAlign="Right">
                        <Cells>
                            <ext:Cell ColSpan="1">
                                <ext:TextField ID="txtSearchNo" Margins="5 5 5 5" runat="server" Text="" FieldLabel="会员卡号"
                                    EnableKeyEvents="true">
                                    <Listeners>
                                        <KeyDown Fn="searchKeyDown" />
                                    </Listeners>
                                </ext:TextField>
                            </ext:Cell>
                            <ext:Cell ColSpan="3">
                                <ext:Button ID="btnSearch" Type="Button" runat="server" Text=" 查 询 " Icon="DatabaseGo"
                                    Margins="10 5 10 5">
                                    <DirectEvents>
                                        <Click OnEvent="btnSearch_Click" DisableCaching="true">
                                            <EventMask ShowMask="true" Msg="正在查询，请稍后..." />
                                        </Click>
                                    </DirectEvents>
                                </ext:Button>
                            </ext:Cell>
                            <ext:Cell ColSpan="1">
                                <ext:Hidden ID="btnMemberID" runat="server" />
                            </ext:Cell>
                            <ext:Cell ColSpan="4">
                                <ext:Label ID="lblMemberInfo" HideLabel="true" FieldLabel="" runat="server" LabelSeparator=""
                                    AutoWidth="true" />
                            </ext:Cell>
                        </Cells>
                    </ext:TableLayout>
                </Items>
            </ext:FormPanel>
            <ext:GridPanel ID="gpMemberCostInfo" runat="server" Title="消费列表" Margins="0 0 5 5"
                Region="Center" Frame="true">
                <Store>
                    <ext:Store ID="storeMemberCostList" runat="server">
                        <Reader>
                            <ext:JsonReader IDProperty="ID">
                                <Fields>
                                    <ext:RecordField Name="SUM" Type="Float" />
                                    <ext:RecordField Name="COSTTIME" Type="Date" />
                                    <ext:RecordField Name="COSTADDRESS" />
                                    <ext:RecordField Name="COSTCUT" />
                                    <ext:RecordField Name="MEMBERID" Type="Int" />
                                    <ext:RecordField Name="SHOPID" Type="Int" />
                                    <ext:RecordField Name="MEMBERNAME" />
                                    <ext:RecordField Name="SHOPNAME" />
                                    <ext:RecordField Name="COSTPOINT" Type="Float" />
                                    <ext:RecordField Name="MEMBERCODE" />
                                    <ext:RecordField Name="PRODUCTNAME" />
                                </Fields>
                            </ext:JsonReader>
                        </Reader>
                    </ext:Store>
                </Store>
                <ColumnModel ID="ColumnModel1" runat="server">
                    <Columns>
                        <ext:Column DataIndex="SUM" Header="消费金额" Width="60" />
                        <ext:DateColumn DataIndex="COSTTIME" Header="消费时间" Width="100" Format="yyyy/MM/dd HH:mm:ss" />
                        <ext:Column DataIndex="COSTADDRESS" Header="消费店铺" Width="60" />
                        <ext:Column ColumnID="Address" DataIndex="COSTCUT" Header="消费折扣" />
                        <ext:Column DataIndex="MEMBERNAME" Header="会员姓名" Width="60" />
                        <ext:Column DataIndex="MEMBERCODE" Header="会员卡号" Width="60" />
                        <ext:Column DataIndex="PRODUCTNAME" Header="商品名称" Width="70" />
                    </Columns>
                </ColumnModel>
                <SelectionModel>
                    <ext:RowSelectionModel ID="rowSelModelMember" runat="server" SingleSelect="true">
                    </ext:RowSelectionModel>
                </SelectionModel>
                <BottomBar>
                    <ext:PagingToolbar ID="PagingToolbar1" runat="server" />
                </BottomBar>
                <LoadMask ShowMask="true" />
            </ext:GridPanel>
        </Items>
    </ext:Viewport>
    </form>
</body>
</html>
